package com.java.jvm.loader;

public class BreakDoubleParentAppClassLoaderTests {//AppClassLoader
    public static void main(String[] args) throws ClassNotFoundException {
        //1.定义类加载源的基础路径
        String baseDir="E:\\TCGBIV\\DEVCODES\\jht2207\\";
        //2.构建类加载器
        BreakDoubleParentAppClassLoader loader1=
               new BreakDoubleParentAppClassLoader(baseDir);
        //3.进行类的加载
        Class<?> aClass1 = loader1.loadClass("pkg.Hello");
        System.out.println(aClass1.getClassLoader());

        BreakDoubleParentAppClassLoader loader2=
                new BreakDoubleParentAppClassLoader(baseDir);
        Class<?> aClass2 = loader2.loadClass("pkg.Hello");
        System.out.println(aClass1==aClass2);//false




    }
}
